<script type="text/javascript">
function IsNumeric()

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;
	var control=document.getElementById('dtcontrol');
 	var sText=control.value;
 	if(sText==null|sText=='') {
			alert('chua dien day du thong tin');
			return false;
 	 	};
 	
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
			alert("So dien thoai chua dung!")	;
				return false;
	         }
      }
   var check1=document.getElementById('check1');
   var check2=document.getElementById('check2');
   	if(check1.checked==false&&check2.checked==false){
				alert('ban phai chon gioi tinh nao!');
				return false;
   	}else if(check1.checked==true&&check2.checked==true){
   		alert('ban khong the co hai gioi tinh dc!');
		return false;
   	}
    var check3=document.getElementById('check3');
    var check4=document.getElementById('check4');
    	if(check3.checked==false&&check4.checked==false){
 				alert('bạn phải chọn nhận/không nhận thông tin qua mail');
 				return false;
    	}else if(check3.checked==true&&check4.checked==true){
    		alert('bạn phải chọn nhận/không nhận thông tin qua mail!');
 		return false;
    	}
    	var pass1=document.getElementById('pass1');
        var pass2=document.getElementById('pass2');
		if(pass1.value!=pass2.value){
				alert('password khong hop le!');
				return false;
			}

        
   return IsNumber;
   
   };


</script>





<div class="center_title_bar">Đăng Ký Admin</div>
    <div class="prod_box_big">
        <div class="top_prod_box_big"></div>
        <div class="center_prod_box_big">
				<form action="successadmin" method="post">
				  <table width="396" border="0" align="center">
				    <tr>
				      <td width="163">Username * </td>
				      <td width="194"><input type="text" name="username" /></td>
				    </tr>
				    <tr>
				      <td>Password*</td>
				      <td><input id="pass1" type="password" name="password" /></td>
				    </tr>
				    <tr>
				      <td>Nh&#7853;p l&#7841;i Password * </td>
				      <td><input id="pass2" type="password" name="password2" /></td>
				    </tr>
					<tr>
				      <td>H&#7885; v&agrave; T&ecirc;n * </td>
				      <td><input type="text" name="hoten" /></td>
				    </tr>
				    <tr>
				      <td>CMND*</td>
				      <td><input type="text" name="cmnd" /></td>
				    </tr>
				    <tr>
				      <td>Địa Chỉ </td>
				      <td><input type="text" name="diachi" /></td>
				    </tr>
				    <tr>
				      <td>S&#7889; &#272;i&#7879;n Tho&#7841;i </td>
				      <td><input id="dtcontrol" type="text" name="dienthoai"/></td>
				    </tr>
				    <tr>
				      <td>Email*</td>
				      <td><input type="text" name="email" /></td>
				    </tr>
				    <tr>
				      <td>Gioi Tinh </td>
				      <td><input id="check1" type="checkbox" name="gioitinh" value="Nam" />
				        Nam
				          
				          <input id="check2" name="gioitinh" type="checkbox" value="Nu" />
				        Nữ</td>
				    </tr>
				    <tr>
				      <td>Nh&#7853;n Th&ocirc;ng Tin Qua Mail </td>
				      <td><input id="check3" type="checkbox" name="checkmail" value="1" />
				        &#272;&#7891;ng &yacute;
				          <input id="check4" type="checkbox" name="checkmail" value="0" />
				        Kh&ocirc;ng &#272;&#7891;ng &Yacute; </td>
				    </tr>
				    <tr>
				      <td align="right">&nbsp;</td>
				      <td><p align="center">&nbsp;
				        </p>
				        <p align="center">
				          <input type="submit" name="button" value="OK" onclick="return IsNumeric()" />
				          <input type="button" name="button" value="Cancel" onclick="dicrect('../index.php')"/>
				          </p>
				       </td>
				      </tr>
				  </table>
				
				</form>
        </div>
        <div class="bottom_prod_box_big"></div>
      </div>